function save() {
    let obj = {
        id:$('[name = id]').val(),
        head: $('[name=head]').val(),
        digest:$('[name=digest]').val(),
        details: $('[name=details]').val(),
        classifly:$('[name=classify]').val(),
        anthour: $('[name=anthour]').val(),
        

    }
    if (obj.id) {
        putProduct(obj.id, obj).then(data => {
            window.location.href = './index.html'
        })
    } else {
        postProduct(obj).then(data => {
            window.location.href = './index.html'
        })
    }
}

function cancel() {
    window.location.href = `./index.html`
}